CAVITY RADAR / DORT-INSPIRED MARK 2 -- RUNNING NOTES
==================================================

MATLAB script: Cavity_Radar_DORT_MARK2.m

Dr Andy Wileman

Tested by static inspection and independent numerical sanity checks;
MATLAB execution with the actual CST files has NOT yet been performed.

HOW TO RUN

1. Put Cavity_Radar_DORT_MARK2.m in the same folder as all 14 original
   CST E/H files for stirrer angles 0, 30, 60, 90, 120, 150, 180 degrees.
2. In MATLAB, set Current Folder to that folder.
3. Run Cavity_Radar_DORT_MARK2.
4. Inputs for a 10 km test: 10000 metres, 0.01 W, 1 m^2, clutter=0 (Default)


If files are absent, the code warns and switches to synthetic-only mode.
The 4.5-GHz CST E/H files anchor state powers/phases and pattern cuts.
The broadband 4-5 GHz cavity response remains synthetic.

MAIN CORRECTIONS

- Correct complex SVD projection D*v, rather than D*conj(v).
- Range-gated SVD follows an independent, blind search across the full
  unambiguous range, rather than a raw SVD of weak frequency samples.
- Power-based dB metrics, corrected range-resolution test.
- No target-truth range is used to constrain the detection algorithm.
- Receiver IF noise bandwidth and noise figure are explicit.
- Calibration errors and follow-up phase drift are included.
- Focused processing uses new, independently noisy measurements.
- Random sparse frequency mask is chosen without consulting target returns.
- Focused results include both GLOBAL and PRIOR-WINDOW range estimates.
- Prior window comes from STAGE 1 discovery, never from true range.

10 km POWER EXAMPLE (default assumptions)

At 4.5 GHz, Pt=10mW, Gt=Gr=16dBi, RCS=1m^2:
1 km:  return approximately -134.5 dBm.
10 km: return approximately -174.5 dBm.
With 5 dB NF and 10 kHz IF noise bandwidth:
    per-measurement noise approximately -129.0 dBm.
10 km single-measurement SNR approximately -45.5 dB.
At 10 km the code automatically uses Nf=131072 and 7 states.
The notional acquisition time is ~91.75 seconds at 100 us/tone.
Ideal Nf*Ns coherent gain is ~59.6 dB BEFORE windows, channel notches,
phase errors, sparse selection, multiple-comparison penalties, etc.
Thus a 10 km detection may work in some noise realisations but will not
be consistently reliable under these default assumptions.
Changing the random seed is a useful way to check repeatability.

For a more demanding comparison, set noise_model="fixed" to emulate the
original -100 dBm per-sample noise floor. The 10 km example would then
have a single-sample SNR near -74.5 dB, not a credible blind-detection
configuration under the present processing assumptions.

WHAT TO LOOK AT

- 'Stage-1 initial incoherent search' and 'Stage-1 range-gated SVD'
  are independent of target truth.
- 'Stage-2 sparse GLOBAL maximum' may be a noise peak.
- 'Stage-2 sparse PRIOR-WINDOW estimate' is a valid focused follow-up
  ONLY if Stage 1 found the correct target initially.
- Within2Res, RangeError_m and PeakToBackground_dB are especially useful.
- Figure 06 is shape-normalized, and must not be used to claim sensitivity
  gains; Figure 07 exposes global noise peaks.

THREE ADDITIONAL FIGURES
------------------------
12_PAPER_DORT_diagnostics.png
  Old three-panel layout: relative singular values, state importance,
  frequency importance with the selected bins overlaid.
  IMPORTANT: the singular-value panel shows raw/ungated values for
  comparison; state importance is from MARK 2 range-gated SVD.
  The marked frequencies are the independent broadband subset selected
  by MARK 2, NOT frequencies selected for high importance as in MARK 1.
  Selected dot markers may be display-decimated to keep MATLAB responsive;
  this DOES NOT change the samples used by the radar model.

13_PAPER_Focused_interrogation_annotated.png
  Old presentation-style full vs reduced range plot with embedded text:
    Full DORT estimate (blind/global)
    Focused GLOBAL estimate
    Focused PRIOR-WINDOW estimate (stage-1 detection prior)
    Measurement reduction in the follow-up acquisition
    Selected states and frequencies
    Transmit power and RCS
  Curves use GLOBAL peak normalization, to avoid hiding a missed target.
  MARK 2 does NOT reuse the noisy full-sweep data for the focused curve.

14_PAPER_Virtual_DORT_polar_cuts.png
  Old side-by-side polar layout, H-cut and V-cut, at CST's 4.5 GHz.
  Radial labels run from -40 to 0 dB. This is a VIRTUAL combination
  of sequential cavity states, not a simultaneous transmit beam.
  Omitted automatically if CST fields are unavailable.

TECHNICAL LIMITS

- Synthetic feasibility model, not broadband CST-validated radar.
- Coherent sweeps assume negligible target motion and channel drift.
- DORT-inspired state/frequency SVD, not classical multistatic DORT.
- CST state combination patterns are virtual, not actual antenna beams.
